package cn.akwangl.design.pattern.behavioral.command.v1;

/**
 * 调用者
 * 
 * @author youyongkun
 * @date 2021/12/7 16:37
 */
public class Invoker {
    private Command command;
    public Invoker(Command command) {
        this.command = command;
    }
    public void setCommand(Command command) {
        this.command = command;
    }
    public void call() {
        System.out.println("调用者执行命令command...");
        command.execute();
    }
}
